package edu.jit.flowers.service;

import java.util.List;
import edu.jit.flowers.bean.Address;
import edu.jit.flowers.dao.AddressDAO;

public class AddressService {
	private AddressDAO rcDao=new AddressDAO();
	//添加收件人地址
    public int addAddress(Address rc) {
   	 return rcDao.addAddress(rc);
    }
    //根据收件人姓名删除收件人地址
    public int deleteAddress(String name) {
   	 return rcDao.deleteAddressByrcName(name);
    }
    //根据收件人Id修改收件人地址
    public int updateAddressById(Address rc) {
   	 return rcDao.updateAddressById(rc);
   	 
    }
  //根据收件人姓名修改收件人地址
    public int updateAddressByrcName(Address rc) {
   	  return rcDao.updateAddressByrcName(rc);
   	 
    }
    
    //查询所有收件人地址
    public List<Address> getAllrcAddress(){
		return rcDao.selectAll();
    }
}
